package com.sm.imlibrary.model.http;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

/**
 * created by zhud on 2019/9/30
 */
public class MessageDataBean implements Parcelable, Serializable {
    public List<MessageBean> messages;
    public List<UserBean> users;

    public MessageDataBean() {
    }

    protected MessageDataBean(Parcel in) {
        messages = in.createTypedArrayList(MessageBean.CREATOR);
        users = in.createTypedArrayList(UserBean.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(messages);
        dest.writeTypedList(users);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<MessageDataBean> CREATOR = new Creator<MessageDataBean>() {
        @Override
        public MessageDataBean createFromParcel(Parcel in) {
            return new MessageDataBean(in);
        }

        @Override
        public MessageDataBean[] newArray(int size) {
            return new MessageDataBean[size];
        }
    };
}
